Matthias Clasen [Wed, 29 Nov 2017 04:27:57 +0000 (23:27 -0500)]
Avoid calling unsetenv too late
Stash the DESKTOP_AUTOSTART_ID env var in a constructor,
before any threads have been created.
https://bugzilla.gnome.org/show_bug.cgi?id=790963
Matthias Clasen [Sun, 17 Dec 2017 22:09:55 +0000 (17:09 -0500)]
cups: Warn only once if colord is not available
No need to keep complaining about this.
https://bugzilla.gnome.org/show_bug.cgi?id=791650
Matthias Clasen [Sun, 17 Dec 2017 21:41:00 +0000 (16:41 -0500)]
wayland: Handle scale 3 for cursors
This is just a bandaid solution to make scale 3 work.
If people seriously want to go for scales larger than
that, we need a better solution.
Matthias Clasen [Sun, 17 Dec 2017 21:40:10 +0000 (16:40 -0500)]
inspector: Allow to bump scale to 3
Might as well allow this, for 'large scale testing'.
Matthias Clasen [Sun, 17 Dec 2017 18:15:18 +0000 (13:15 -0500)]
Remove unneeded deprecation guards
No deprecated api used in here, it seems.
Matthias Clasen [Sun, 17 Dec 2017 15:52:33 +0000 (10:52 -0500)]
Don't place dnd cursor in placeholder text
That is just misleading - the entire placeholder text is going
to be replaced by the drop.
Benjamin Otte [Sat, 16 Dec 2017 01:46:13 +0000 (02:46 +0100)]
dnd: Get rid of IPC widgets
Instead, pass the source window to gdk_drag_begin().
Also make Wayland use this window instead of the one under the pointer
(though those 2 Windows are most likely the same anyway).
Benjamin Otte [Sat, 16 Dec 2017 01:24:12 +0000 (02:24 +0100)]
x11: Add necessary NULL check
Benjamin Otte [Sat, 16 Dec 2017 00:54:25 +0000 (01:54 +0100)]
dnd: Remove unused function
The function was referencing itself in ways that bamboozled gcc:
static void
foo (void)
{
g_signal_handlers_disconnect_by_func (NULL, foo, NULL);
}
Well done, function, you get your own commit!
Benjamin Otte [Sat, 16 Dec 2017 00:49:01 +0000 (01:49 +0100)]
x11: Try getting ipc_window vs source_window right
This is in preparation for splitting these. Unfortunately, source_window
== ipc_window, so this isn't very debuggable yet.
Benjamin Otte [Sat, 16 Dec 2017 00:40:47 +0000 (01:40 +0100)]
x11: Use gdk_drag_context_get_display()
Benjamin Otte [Fri, 15 Dec 2017 23:17:40 +0000 (00:17 +0100)]
x11: Create IPC window outselves
Ignore the passed in IPC window.
Matthias Clasen [Fri, 15 Dec 2017 23:46:21 +0000 (18:46 -0500)]
listbox: Fix a crash during keynav
The code was asserting something that was not always holding
true. We can hit row == NULL here on page-up too. Handle that
case by moving to the first row.
https://bugzilla.gnome.org/show_bug.cgi?id=791549
Benjamin Otte [Fri, 15 Dec 2017 22:57:33 +0000 (23:57 +0100)]
dnd: Remove handler for nonexisting signal
The signal has been gone since
e3e9bf4bea3307e9d0c6728d82f04994b069005f
Benjamin Otte [Fri, 15 Dec 2017 22:53:18 +0000 (23:53 +0100)]
gtk: Remove unused include
Benjamin Otte [Fri, 15 Dec 2017 21:54:34 +0000 (22:54 +0100)]
gdk: Remove DRAG_STATUS and DROP_FINISHED events
Those are source-side events that are handled by signals of the
Dragontext these days.
Matthias Clasen [Fri, 15 Dec 2017 21:17:27 +0000 (16:17 -0500)]
x11: Avoid crash in fallback move emulation
Quietly do nothing when there is already an ongoing operation.
This matches the behavior of the ewmh code, and is much nicer
than a crash.
https://bugzilla.gnome.org/show_bug.cgi?id=789054
Juan Pablo Ugarte [Thu, 14 Dec 2017 18:35:40 +0000 (15:35 -0300)]
css: Fix segfault when GtkCssStyleChange is NULL on gtk_widget_real_style_updated()
https://bugzilla.gnome.org/show_bug.cgi?id=791281
Matthias Clasen [Fri, 15 Dec 2017 12:48:36 +0000 (07:48 -0500)]
Mention keymaps in the migration guide
Just another bullet point.
Matthias Clasen [Fri, 15 Dec 2017 12:46:35 +0000 (07:46 -0500)]
Drop gdk_keymap_get_for_display
It has been replaced by gdk_display_get_keymap.
Matthias Clasen [Fri, 15 Dec 2017 12:44:58 +0000 (07:44 -0500)]
Replace gdk_keymap_get_for_display by gdk_display_get_keymap
Replace all uses of the old function by the new one.
No functional change.
Matthias Clasen [Fri, 15 Dec 2017 11:53:13 +0000 (06:53 -0500)]
Add gdk_display_get_keymap
This is just a better name for gdk_keymap_get_for_display.
Matthias Clasen [Fri, 15 Dec 2017 04:57:54 +0000 (23:57 -0500)]
Drop gdk_keymap_get_default()
It is better to use the explicit keymap getter - the
default display may not even use the current gdk backend.
Matthias Clasen [Fri, 15 Dec 2017 04:35:08 +0000 (23:35 -0500)]
gdk: Drop GDK_DAMAGE
We haven't been generating events of this type
since we dropped offscreen windows.
Matthias Clasen [Fri, 15 Dec 2017 03:55:03 +0000 (22:55 -0500)]
Drop GDK_CLIENT_EVENT
We never generate events of this type, so no need
to carry it around.
Matthias Clasen [Fri, 15 Dec 2017 03:43:53 +0000 (22:43 -0500)]
gdk: Remove explicit event type numbering
The numeric values of event types are irrelevant,
so we don't need to declare them explicitly.
Matthias Clasen [Fri, 15 Dec 2017 03:35:27 +0000 (22:35 -0500)]
Move code around
gdk_window_set_state is now an ordinary (private) setter,
so it should live in gdkwindow.c.
Matthias Clasen [Fri, 15 Dec 2017 03:23:01 +0000 (22:23 -0500)]
gdk: Drop GdkEventWindowState
No longer generate this event. Instead, emit change
notification for GdkWindow::state.
Matthias Clasen [Fri, 15 Dec 2017 03:21:21 +0000 (22:21 -0500)]
widget: Remove the ::window-state-event signal
We no longer use this signal, so remove it.
Matthias Clasen [Fri, 15 Dec 2017 03:20:38 +0000 (22:20 -0500)]
gtk: Stop handling GdkEventWindowState
These events have been superseded by GdkWindow::state.
Matthias Clasen [Fri, 15 Dec 2017 03:19:53 +0000 (22:19 -0500)]
menu: Stop using GdkEventWindowState
These events are going away.
Matthias Clasen [Fri, 15 Dec 2017 03:11:50 +0000 (22:11 -0500)]
a11y: Stop using GdkEventWindowState
These events are going way.
Matthias Clasen [Fri, 15 Dec 2017 03:11:14 +0000 (22:11 -0500)]
headerbar: Stop using GdkEventWindowState
Use GdkWindow::state instead - the event is going away.
Matthias Clasen [Fri, 15 Dec 2017 03:10:44 +0000 (22:10 -0500)]
gtk-demo: Stop using GdkEventWindowState
Use GdkWindow::state instead - the event is going away.
Matthias Clasen [Fri, 15 Dec 2017 03:09:13 +0000 (22:09 -0500)]
testgtk: Stop using GdkEventWindowState
Use GdkWindow::state instead - the event is going away.
Matthias Clasen [Fri, 15 Dec 2017 02:07:39 +0000 (21:07 -0500)]
gtk: Stop using GdkEventWindowState
We can instead use the new GdkWindow::state property
change notification. The event is going away.
Matthias Clasen [Thu, 14 Dec 2017 23:51:38 +0000 (18:51 -0500)]
gdk: Add a GdkWindow::state property
This will eventually replace the window state event.
Daniel Boles [Mon, 4 Dec 2017 15:09:53 +0000 (15:09 +0000)]
FileChooser: Update set_local_only() doc’s default
The property now defaults to FALSE, but the setter doc didn’t reflect it
While here, add a missing apostrophe too.
https://bugzilla.gnome.org/show_bug.cgi?id=791176
Benjamin Otte [Thu, 14 Dec 2017 12:46:37 +0000 (13:46 +0100)]
x11: Remove GdkAtom usage from dnd code
Use strings instead.
Benjamin Otte [Thu, 14 Dec 2017 12:34:40 +0000 (13:34 +0100)]
display: Remove leftover old clipboard APIs
Krzesimir Nowak [Thu, 14 Dec 2017 12:34:06 +0000 (13:34 +0100)]
x11: Fix erroneous & to be &&
Benjamin Otte [Thu, 14 Dec 2017 12:02:50 +0000 (13:02 +0100)]
x11: Get rid of default Atom converters
No, using the default Wayland display is not okay to query Atoms.
Benjamin Otte [Thu, 14 Dec 2017 11:51:22 +0000 (12:51 +0100)]
device: Make axis label a regular string
Atoms are about to die.
Stas Solovey [Thu, 14 Dec 2017 09:58:07 +0000 (09:58 +0000)]
Update Russian translation
(cherry picked from commit
d69f998c260b677cda7060183649091b080c203e)
Matthias Clasen [Thu, 14 Dec 2017 04:47:51 +0000 (23:47 -0500)]
Drop atom apis from the docs
These no longer exist.
Matthias Clasen [Thu, 14 Dec 2017 04:47:02 +0000 (23:47 -0500)]
Drop atom-related cast macros
These don't really add anything, just drop them.
Matthias Clasen [Thu, 14 Dec 2017 04:39:03 +0000 (23:39 -0500)]
Drop gdk_atom_intern
Atoms are just interned strings now, so we can just
use g_intern_string.
Matthias Clasen [Thu, 14 Dec 2017 04:26:23 +0000 (23:26 -0500)]
Drop gdk_atom_name
Since atoms are just interned strings now, we can just
cast them to const char * where needed.
Matthias Clasen [Thu, 14 Dec 2017 03:52:50 +0000 (22:52 -0500)]
Remove no-longer-used signals
GtkWidget::selection-get and ::selection-received are no
longer used, so get rid of them.
Benjamin Otte [Thu, 14 Dec 2017 03:34:33 +0000 (04:34 +0100)]
dnd: Remove gdk_drag_get_selection()
Without selections, drags can't have them either.
Also included is removing the selection from GtkSelectionData.
Includes a bunch of crude cleanups to Wayland code that no longer has to
care about selection atoms.
Benjamin Otte [Thu, 14 Dec 2017 03:20:48 +0000 (04:20 +0100)]
gdk: Remove ability to request selection notifications
Without selections, that's kinda pointless.
Benjamin Otte [Thu, 14 Dec 2017 02:01:59 +0000 (03:01 +0100)]
gdk: Remove properties
They are not used anymore.
Gone with them are PropertyNotify events.
Benjamin Otte [Thu, 14 Dec 2017 02:01:32 +0000 (03:01 +0100)]
broadway: Make compile after GdkEvent objectification
Benjamin Otte [Thu, 14 Dec 2017 02:01:00 +0000 (03:01 +0100)]
gesture: Fix gcc constness warning
Benjamin Otte [Thu, 14 Dec 2017 01:59:58 +0000 (02:59 +0100)]
x11: Make unsetting transient-for work
... and just unset it from GtkWindow instead of fiddling with
properties.
Benjamin Otte [Thu, 14 Dec 2017 00:03:00 +0000 (01:03 +0100)]
gdk: Remove selection defines
And with it, remove the selections section from the docs.
So selections are gone for good now.
Georges Basile Stavracas Neto [Thu, 14 Dec 2017 01:14:58 +0000 (23:14 -0200)]
vulkan: Destroy buffer before releasing associate memory
Exact same issue as the previous commit.
Georges Basile Stavracas Neto [Thu, 14 Dec 2017 00:43:50 +0000 (22:43 -0200)]
vulkan: Destroy image before releasing associate memory
VkImage contains a reference to the VkDeviceMemory and, because
the current code frees the VkDeviceMemory before destroying the
VkImage that references it, a warning is triggered by the validation
layers.
This is not critical, since we release both resources at the same
place. But the warning triggered by the validation layers sums up
adding 1 MB per second of extra debug logging, making the debugging
process much more painful.
This commit simply swaps the destruction order, and destroys the
VkImage first, then the now unused VkDeviceMemory.
Piotr DrÄ…g [Thu, 14 Dec 2017 00:15:17 +0000 (01:15 +0100)]
Update POTFILES.in
Carlos Garnacho [Tue, 31 Oct 2017 14:40:16 +0000 (15:40 +0100)]
gdk: Make gdk_display_peek_event() Return a reference to the event
No need to copy it.
Carlos Garnacho [Tue, 31 Oct 2017 13:03:35 +0000 (14:03 +0100)]
gtk: Make gtk_get_current_event() return a reference
All callers in gtk seem to be ok with it, and it makes sense if
we are dealing with events as "static after delivered".
Carlos Garnacho [Tue, 31 Oct 2017 12:55:33 +0000 (13:55 +0100)]
gtk: Avoid some event copies
Those places can do with an extra reference.
Carlos Garnacho [Tue, 31 Oct 2017 12:45:41 +0000 (13:45 +0100)]
gtk: s/gdk_event_free/g_object_unref/
Carlos Garnacho [Tue, 31 Oct 2017 12:36:31 +0000 (13:36 +0100)]
gdk/wayland: s/gdk_event_free/g_object_unref/
Carlos Garnacho [Tue, 31 Oct 2017 12:35:11 +0000 (13:35 +0100)]
gdk/x11: s/gdk_event_free/g_object_unref/
Carlos Garnacho [Tue, 31 Oct 2017 12:18:49 +0000 (13:18 +0100)]
gdk: Remove gdk_window_[gs]et_event_compression()
Motion compression is now the unmodifiable default, callers may
call gdk_event_get_motion_history() to check the uncoalesced
motion history.
Carlos Garnacho [Tue, 31 Oct 2017 11:45:37 +0000 (12:45 +0100)]
gtk: Remove CONSTRUCT_ONLY flag from GtkEventControllerScroll::flags
There is a gtk_event_controller_scroll_set_flags() call that's meant
to be called after construction (eg. due to scrolledwindow relayouts
hiding/showing scrollbars). The property shouldn't be construct-only
for consistence.
Carlos Garnacho [Tue, 31 Oct 2017 11:37:50 +0000 (12:37 +0100)]
gdk: Implement motion history as motion event data
In the motion compression phase the coalesced events will be saved
as a GdkTimeCoord on the motion event that shall be delivered.
For simplicity (and because history doesn't make much sense otherwise)
event history is only recorded while there are buttons pressed, this
also tidily ensures that those coalesced events would have the same
target widget on the gtk side than the delivered one, because of
implicit grabs.
Carlos Garnacho [Tue, 31 Oct 2017 11:21:29 +0000 (12:21 +0100)]
gdk: Keep reference on tools from motion/button events.
Carlos Garnacho [Wed, 25 Oct 2017 13:49:19 +0000 (15:49 +0200)]
gdk: Move additional code in gdk_event_new() to GdkEvent::constructed
Now that the type is a construct only property, we can initialize the
event fields properly here.
Carlos Garnacho [Wed, 25 Oct 2017 13:46:47 +0000 (15:46 +0200)]
gdk: Make GdkEvent type a construct only property
So it must be set at the time of doing g_object_new().
Carlos Garnacho [Wed, 25 Oct 2017 12:21:38 +0000 (14:21 +0200)]
gdk: Remove gdk_event_is_allocated()
All events are allocated now.
Carlos Garnacho [Wed, 25 Oct 2017 11:40:28 +0000 (13:40 +0200)]
gtk: Adapt marshallers to GdkEvent as GObject
Carlos Garnacho [Wed, 25 Oct 2017 11:23:41 +0000 (13:23 +0200)]
gdk: Turn GdkEvent into a GObject
Two warts remain. gdk_event_copy() should be unnecessary as
events should be considered static after delivery, so g_object_ref()
should be just as good. There's a few exceptional cases that the event
is copied and then modifier for later processing, those cases should be
reconsidered individually.
And gdk_event_free() could be likewise turned into g_object_unref(),
many callers remain though.
Carlos Garnacho [Wed, 25 Oct 2017 12:06:20 +0000 (14:06 +0200)]
gdk: Remove GdkDisplay from GdkEventPrivate
And add it to GdkEventAny.
Carlos Garnacho [Wed, 25 Oct 2017 11:50:55 +0000 (13:50 +0200)]
gdk: Figure out the GdkSeat of an event from the GdkDevice
Removes the need for gdk_event_set_seat() and the GdkSeat field from
GdkEventPrivate.
Carlos Garnacho [Wed, 25 Oct 2017 10:29:43 +0000 (12:29 +0200)]
gdk: Use allocated events
Stack allocated GdkEvent structs will not be ok when events become
objects.
Carlos Garnacho [Wed, 25 Oct 2017 10:26:32 +0000 (12:26 +0200)]
gtk/a11y: Use allocated events
Using stack allocated GdkEvent will not be ok when they become
objects.
Carlos Garnacho [Wed, 11 Oct 2017 06:42:41 +0000 (08:42 +0200)]
gdk: Fold GdkEventPrivate fields into event structs
Now all events structs are private, it doesn't make as much sense
having GdkEventPrivate wrapping allocating events. This is a first
step towards removing it.
Carlos Garnacho [Wed, 11 Oct 2017 13:55:19 +0000 (15:55 +0200)]
gdk: Remove GdkEventType argument from GdkEvent union
It won't stand true anymore that the GdkEventType argument is the
first field of the GdkEvent* structs. All callers have been updated
to use event->any.type instead.
Carlos Garnacho [Wed, 11 Oct 2017 13:35:29 +0000 (15:35 +0200)]
gdk: Refurbish GdkEvent struct hierarchy
Make all specific event structs contain a GdkEventAny, so the base
struct can be extended without modifying structs all over the place.
Matthias Clasen [Wed, 13 Dec 2017 04:22:32 +0000 (23:22 -0500)]
Redo drag source event handling
Let the gesture itself handle the events.
Benjamin Otte [Wed, 13 Dec 2017 23:43:19 +0000 (00:43 +0100)]
gdk: Remove gdk_selection_convert()
It's not used anymore.
Benjamin Otte [Wed, 13 Dec 2017 22:52:55 +0000 (23:52 +0100)]
dnd: Only send DELETE request on X11
This is Xdnd-specific and doesn't need to happen elsewhere.
Benjamin Otte [Wed, 13 Dec 2017 22:39:02 +0000 (23:39 +0100)]
gdk: Remove ability to own a selection
With this, the GDK_EVENT_SELECTION_REQUEST and GDK_EVENT_SELECTION_CLEAR
and the associated GtkWidget signals are gone, too.
Benjamin Otte [Wed, 13 Dec 2017 18:40:24 +0000 (19:40 +0100)]
tests: Remove testselection
With selections goig away, this test is not very useful anymore.
Benjamin Otte [Wed, 13 Dec 2017 18:37:11 +0000 (19:37 +0100)]
xxx: don't claim dnd selection
Benjamin Otte [Wed, 13 Dec 2017 18:27:51 +0000 (19:27 +0100)]
gdk: Remove gdk_selection_add_targets()
It's not needed anymore, now that we can look at the content provider's
formats.
Alose remove all the API in GTK that was used to set it.
Benjamin Otte [Wed, 13 Dec 2017 17:22:21 +0000 (18:22 +0100)]
x11: Move selection handling to GDK
Instead of claiming the selection in GTK, claim it in the X11 dnd code.
Also handle SelectionRequest and SelectionClear X events there.
Benjamin Otte [Wed, 13 Dec 2017 14:03:53 +0000 (15:03 +0100)]
dnd: Pass content to gdk_drag_begin()
Instead of just passing the GdkContentFormats, we are now passing the
GdkContentProvider to gdk_drag_begin().
This means that GDK itself can now query the data from the provider
directly instead of having to send selection events.
Use this to provide the private API gdk_drag_context_write() that allows
backends to pass an output stream that this data will be written to.
Implement this as the mechanism for providing drag data on Wayland.
And to make this all work, implement a content provider named
GtkDragContent that is implemented by reverting to the old DND
drag-data-get machinery inside GTK, so for widgets everything works just
like before.
Matthias Clasen [Wed, 13 Dec 2017 04:23:17 +0000 (23:23 -0500)]
A forgotten file
These changes belong to the scale button autoscrollling
commit.
Matthias Clasen [Wed, 13 Dec 2017 04:21:26 +0000 (23:21 -0500)]
Make sure events have displays
This seems to be necessary if you want to call
gdk_display_put_event on them.
Matthias Clasen [Wed, 13 Dec 2017 03:55:48 +0000 (22:55 -0500)]
toolbar: Stop using legacy event signals
We can reuse the button gesture here.
Matthias Clasen [Wed, 13 Dec 2017 03:21:43 +0000 (22:21 -0500)]
scalebutton: Add autoscrolling
Use the smooth autoscrolling that the scale can do,
and at the same time stop using legacy event signals.
Matthias Clasen [Wed, 13 Dec 2017 03:18:19 +0000 (22:18 -0500)]
button: Add private api to get at the gesture
Attaching another gesture from the outside does not
work currently, so let widgets share their button's
gesture for now.
Matthias Clasen [Wed, 13 Dec 2017 03:17:49 +0000 (22:17 -0500)]
range: Add private api to autoscroll
This will be used to scroll the scale in scale buttons.
Matthias Clasen [Wed, 13 Dec 2017 01:49:31 +0000 (20:49 -0500)]
path bar: Drop non-functional hold-to-scroll code
Scrolling a path bar is of marginal usefulness - you need to
find a really deep place in your filesystem hierarchy in order
to scroll one or two places at best. And the code we had for
this was not working. And it was using legacy event handlers.
Instead of fixing it, remove it.
Benjamin Otte [Wed, 13 Dec 2017 00:53:17 +0000 (01:53 +0100)]
x11: Refactor xevent filtering some more
We now have a GdkX11Display::xevent signal that gets emitted for every
XEvent and allows you to interrupt processing via TRUE/FALSE return
values.
These return values to correspond to GDK_FILTER_REMOVE and
GDK_FILTER_CONTINUE respectively.
The GDK_FILTER_TRANSLATE case from gdk_window_add_filter() is now meant
to be handled via gdk_display_put_event().
Matthias Clasen [Wed, 13 Dec 2017 00:13:52 +0000 (19:13 -0500)]
widget-factory: Avoid a legacy event handler
We can use a gesture instead, here.
Benjamin Otte [Wed, 13 Dec 2017 00:09:32 +0000 (01:09 +0100)]
x11: Use GdkX11Display::translate-event more